package com.dm.flyweight.demo01;

public class Client {

	public static void main(String[] args) {
		/**
		 * 简单版
		 */
		GlyphContext context = new GlyphContext();
		
		Glyph row = FlyweightFactory.createRow();
		row.draw(context);
		
		Glyph column = FlyweightFactory.createColumn();
		column.draw(context);
		
		Glyph character = FlyweightFactory.createCharacter("a");
		character.draw(context);
		
		column = FlyweightFactory.createColumn();
		column.draw(context);
		
		character = FlyweightFactory.createCharacter("b");
		character.draw(context);
		
		System.out.println(context.content);
		
	}
}
